Early Preview
This is currently very much a preview. Please feel free to try things out,
but don't be upset if anything is not yet working. Feedback is welcome over on our
GitHub Dicussions page.
class System.​Net.​Http.​Headers.​HttpHeaderValueCollection<​T>
Assembly: System.Net.Http
Inheritance: object → HttpHeaderValueCollection
Implemented Interfaces
- Collections.​Generic.​ICollection`1 (Inherits: IEnumerable<​T>IEnumerable)
Represents a collection of header values.
Properties
public
int
Count
Gets the number of headers in the <see cref="T:System.Net.Http.Headers.HttpHeaderValueCollection`1" /> .
public
bool
IsReadOnly
Gets a value indicating whether the <see cref="T:System.Net.Http.Headers.HttpHeaderValueCollection`1" /> instance is read-only.
Methods
public
void
Add​(T item)
Adds an entry to the <see cref="T:System.Net.Http.Headers.HttpHeaderValueCollection`1" /> .
item
The item to add to the header collection.
public
void
Clear​()
Removes all entries from the <see cref="T:System.Net.Http.Headers.HttpHeaderValueCollection`1" /> .
public
bool
Contains​(T item)
Determines if the <see cref="T:System.Net.Http.Headers.HttpHeaderValueCollection`1" /> contains an item.
Returns <see langword="true" /> if the entry is contained in the <see cref="T:System.Net.Http.Headers.HttpHeaderValueCollection`1" /> instance; otherwise, <see langword="false" /> .
item
The item to find to the header collection.
public
void
CopyTo​(T[] array,
int arrayIndex)
Copies the entire <see cref="T:System.Net.Http.Headers.HttpHeaderValueCollection`1" /> to a compatible one-dimensional <see cref="T:System.Array" /> , starting at the specified index of the target array.
array
The one-dimensional <see cref="T:System.Array" /> that is the destination of the elements copied from <see cref="T:System.Net.Http.Headers.HttpHeaderValueCollection`1" /> . The <see cref="T:System.Array" /> must have zero-based indexing.
arrayIndex
The zero-based index in <paramref name="array" /> at which copying begins.
public
Collections.​Generic.​IEnumerator<​T>
GetEnumerator​()
Returns an enumerator that iterates through the <see cref="T:System.Net.Http.Headers.HttpHeaderValueCollection`1" /> .
Returns An enumerator for the <see cref="T:System.Net.Http.Headers.HttpHeaderValueCollection`1" /> instance.
public
void
ParseAdd​(string input)
Parses and adds an entry to the <see cref="T:System.Net.Http.Headers.HttpHeaderValueCollection`1" /> .
input
The entry to add.
public
bool
Remove​(T item)
Removes the specified item from the <see cref="T:System.Net.Http.Headers.HttpHeaderValueCollection`1" /> .
Returns <see langword="true" /> if the <paramref name="item" /> was removed from the <see cref="T:System.Net.Http.Headers.HttpHeaderValueCollection`1" /> instance; otherwise, <see langword="false" /> .
item
The item to remove.
public
string
ToString​()
Returns a string that represents the current <see cref="T:System.Net.Http.Headers.HttpHeaderValueCollection`1" /> object. object.
Returns A string that represents the current object.
public
bool
TryParseAdd​(string input)
Determines whether the input could be parsed and added to the <see cref="T:System.Net.Http.Headers.HttpHeaderValueCollection`1" /> .
Returns <see langword="true" /> if the <paramref name="input" /> could be parsed and added to the <see cref="T:System.Net.Http.Headers.HttpHeaderValueCollection`1" /> instance; otherwise, <see langword="false" /> .
input
The entry to validate.
public
bool
Equals​(object obj)
Inherited from object
protected
void
Finalize​()
Inherited from object
public
int
GetHashCode​()
Inherited from object
protected
object
MemberwiseClone​()
Inherited from object